package com.ulic.customerManApplication.achievementmodule.bo;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.ulic.customerManApplication.journeylovemodule.bo.JourneyOfLoveActivity;
import com.ulic.customerManApplication.usermodule.bo.User;
@Entity
@Table(name="T_GYW_SUB_ACHIEVEMENT")
@SequenceGenerator(name="sub_achievement_seq",sequenceName="S_GYW_SUB_ACHIEVEMENT_ID")
public class SubAchievement {

	private Integer sub_id;
	private String sub_achieveName;//成果名称
	private String sub_achieveNumber;//成果数量
	private String sub_school;//所在学校
	private Date sub_createDate;// 创建日期

	private User sub_user;// 创建者

	private String subCompany;// 所属分公司
	
	private String subCity;// 所属中支
	
	private String subComName;//分公司名称
	
	private String subCityName;//中支名称
	
	private JourneyOfLoveActivity sub_journeyOfLoveActivity;//所属爱心之旅

	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="sub_achievement_seq")
	public Integer getSub_id() {
		return sub_id;
	}
	
	public void setSub_id(Integer subId) {
		sub_id = subId;
	}
	 
	public String getSub_achieveName() {
		return sub_achieveName;
	}

	public void setSub_achieveName(String subAchieveName) {
		sub_achieveName = subAchieveName;
	}

	public String getSub_achieveNumber() {
		return sub_achieveNumber;
	}

	public void setSub_achieveNumber(String subAchieveNumber) {
		sub_achieveNumber = subAchieveNumber;
	}

	public String getSub_school() {
		return sub_school;
	}

	public void setSub_school(String subSchool) {
		sub_school = subSchool;
	}

	public Date getSub_createDate() {
		return sub_createDate;
	}

	public void setSub_createDate(Date subCreateDate) {
		sub_createDate = subCreateDate;
	}

	@ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY, optional = false)   
    @JoinColumn(name="UM_USER_ID")
    public User getSub_user() {
		return sub_user;
	}
	
	public void setSub_user(User subUser) {
		sub_user = subUser;
	}
	 
	@ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY, optional = false)   
    @JoinColumn(name="JOURNEYLOVE_ID")
    public JourneyOfLoveActivity getSub_journeyOfLoveActivity() {
		return sub_journeyOfLoveActivity;
	}
	

	public void setSub_journeyOfLoveActivity(
			JourneyOfLoveActivity subJourneyOfLoveActivity) {
		sub_journeyOfLoveActivity = subJourneyOfLoveActivity;
	}

	public String getSubCompany() {
		return subCompany;
	}

	public void setSubCompany(String subCompany) {
		this.subCompany = subCompany;
	}

	public String getSubCity() {
		return subCity;
	}

	public void setSubCity(String subCity) {
		this.subCity = subCity;
	}

	public String getSubComName() {
		return subComName;
	}

	public void setSubComName(String subComName) {
		this.subComName = subComName;
	}

	public String getSubCityName() {
		return subCityName;
	}

	public void setSubCityName(String subCityName) {
		this.subCityName = subCityName;
	}
	 
}
